import request from '../utils/request.js'

// swiper图片
export const getOpenId = (data) => {
	return request.get({
		url: '/Weixin/getweixin',
		data
	})
}

export const doWxLogin = (data) => {
	return request.post({
		url: '/Weixin/weixinLogin',
		methods: "POST",
		data
	})
}

export const loginOut = () => {
	return request.get({
		url: '/Member/logout',
		methods: "GET"
	})
}

// 发送短信
export const sendSms = (data) => {
	return request.post({
		url: '/sms/send',
		methods: "POST",
		data
	})
}
// 修改手机号
export const editTel = (data) => {
	return request.post({
		url: '/member/editTel',
		methods: "POST",
		data
	})
}

// 手机号登录/member/mobilelogin
export const mobilelogin = (data) => {
	return request.post({
		url: '/member/mobilelogin',
		methods: "POST",
		data
	})
}

// 获取常用用户 getMemInfo
export const getMemInfo = () => {
	return request.get({
		url: '/member/getMemInfo',
		methods: "GET",
	})
}
// 添加常用联系人
export const addMemInfo = (data) => {
	return request.post({
		url: '/member/addMemInfo',
		data: data,
		methods: 'POST'
	})
}

// profile
export const profile = (data) => {
	return request.post({
		url: '/member/profile',
		data: data
	})
}